<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<!DOCTYPE html>
<html lang="en">
<head>
    <base href="<%=basePath%>">
    <meta charset="utf-8"/>
    <title></title>
    <meta name="description" content="overview & stats"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <link href="static/css/bootstrap.min.css" rel="stylesheet"/>
    <link href="static/css/zcss/zcardnode.css" rel="stylesheet"/>
    <script type="text/javascript" src="static/js/jquery-1.7.2.js"></script>
    <script type="text/javascript" src="static/js/jquery.tips.js"></script>

    <script type="text/javascript">
        //保存
        function save() {
            $("#Form").submit();
            $("#zhongxin").hide();
            $("#zhongxin2").show();
        }

    </script>
</head>
<body>
<form action="cardnode/${msg }.do" name="Form" id="Form" method="post">
    <input type="hidden" name="id" id="id" value="${entity.id}"/>
    <div id="zhongxin">
        <table id="table_report" class="table table-striped table-bordered table-hover">
            <tr>
                <td style="width:70px;text-align: right;padding-top: 13px;">号段开始:</td>
                <td>
                    <span id="Sphone">
                       ${entity.start}
                        <input type="text" id="startP0" class="hideI" name="start0" value="${entity.start}" readonly/>
                        <input type="text" id="startP1" class="hideI" name="start1"/>
                    </span>
                    <%--<input type="text" name="start" id="start" value="${entity.start}" readonly="readonly"--%>
                    <%--maxlength="32" placeholder="号段开始" title="号段开始"/>--%>
                </td>
            </tr>
            <tr>
                <td style="width:70px;text-align: right;padding-top: 13px;">号段结束:</td>
                <td>
                    <span id="Ephone">
                        ${entity.end}
                        <input type="text" id="endP0" class="hideI" name="end0" value="${entity.end}" readonly/>
                        <input type="text" id="endP1" class="hideI" name="end1"/>
                    </span>
                    <mark class="ztips"></mark>

            </tr>

            <tr class="info">
                <td style="width:70px;text-align: right;padding-top: 13px;">用户:</td>
                <td>
                    <select id="authUserId" name="authUserId" data-placeholder="用户名"
                            style="vertical-align:top; width: 150px;">
                        <c:forEach items="${userList}" var="var" varStatus="vs">
                            <option value="${var.USER_ID}"
                                    <c:if test="${var.USER_ID eq entity.userId }">selected</c:if>>${var.USERNAME}</option>
                        </c:forEach>
                    </select>
                </td>
            </tr>

            <c:if test="${isAdmin == '1'}">
                <tr>
                    <td style="width:70px;text-align: right;padding-top: 13px;">移动激活日期:</td>
                    <td><input class="span10 date-picker" name="openDate"
                               id="openDate" value="${entity.openDateStr}" type="text"
                               data-date-format="yyyy-mm-dd" readonly="readonly"
                               style="width:88px;" placeholder="移动激活日期"/>
                    </td>
                </tr>

                <tr>
                    <td style="width:70px;text-align: right;padding-top: 13px;">客户激活日期:</td>
                    <td><input class="span10 date-picker" name="userOpenDate"
                               id="userOpenDate" value="${entity.userOpenDateStr}" type="text"
                               data-date-format="yyyy-mm-dd" readonly="readonly"
                               style="width:88px;" placeholder="客户激活日期"/>
                    </td>
                </tr>

                <tr class="info">
                    <td style="width:70px;text-align: right;padding-top: 13px;">平台:</td>
                    <td>
                    <span class="selectdiv">
                    <select name="appId" id="appId" data-placeholder="请选择应用平台"
                            style="vertical-align:top;">
                        <c:forEach items="${appList}" var="app">
                            <option value="${app.appId }"
                                    <c:if test="${app.appId == user.appId }">selected</c:if>>${app.appName }</option>
                        </c:forEach>
                    </select>
                    </span>
                    </td>
                </tr>

                <tr class="info">
                    <td style="width:70px;text-align: right;padding-top: 13px;">移动流量套餐:</td>
                    <td>
                        <select id="pkg" name="pkg" data-placeholder="移动流量套餐"
                                style="vertical-align:top; width: 150px;">
                            <c:forEach items="${pkgList}" var="var" varStatus="vs">
                                <option value="${var.type}"
                                        <c:if test="${var.type == entity.pkg }">selected</c:if>>${var.desc}</option>
                            </c:forEach>
                        </select>
                    </td>
                </tr>

                <tr class="info">
                    <td style="width:70px;text-align: right;padding-top: 13px;">用户流量套餐:</td>
                    <td>

                        <select id="userPkg" name="userPkg" data-placeholder="用户流量套餐"
                                style="vertical-align:top; width: 150px;">
                            <c:forEach items="${pkgList}" var="var" varStatus="vs">
                                <option value="${var.type}"
                                        <c:if test="${var.type == entity.userPkg }">selected</c:if>>${var.desc}</option>
                            </c:forEach>
                        </select>

                    </td>
                </tr>

                <tr>
                    <td style="width:70px;text-align: right;padding-top: 13px;">按年价格:</td>
                    <td><input type="text" name="userPrice" id="userPrice" value="${entity.userPrice}"
                               maxlength="32"
                               placeholder="按年价格" title="按年价格"/></td>
                </tr>
            </c:if>
            <tr>
                <td style="text-align: center;" colspan="10">
                    <a class="btn btn-success" onclick="save();" style="margin-right: 20px;background: #2283C5">保存</a>
                    <a class="btn" onclick="top.Dialog.close();" style="background: #D15B47;color:#fff;">取消</a>
                </td>
            </tr>
        </table>
    </div>

    <div id="zhongxin2" style="display:none"><br/><br/><br/><br/><br/><img
            src="static/images/jiazai.gif"/><br/><h4 class="lighter block green">提交中...</h4></div>

</form>


<!-- 引入 -->
<script type="text/javascript">window.jQuery || document.write("<script src='static/js/jquery-1.9.1.min.js'>\x3C/script>");</script>
<script src="static/js/bootstrap.min.js"></script>
<script src="static/js/ace-elements.min.js"></script>
<script src="static/js/ace.min.js"></script>
<script type="text/javascript" src="static/js/chosen.jquery.min.js"></script><!-- 下拉框 -->
<script type="text/javascript" src="static/js/bootstrap-datepicker.min.js"></script><!-- 日期框 -->
<script type="text/javascript" src="static/js/zjs/zcardnode.js"></script>
<script type="text/javascript">
    $(top.hangge());
    $(function () {

        //单选框
        $(".chzn-select").chosen();
        $(".chzn-select-deselect").chosen({allow_single_deselect: true});

        //日期框
        $('.date-picker').datepicker();

    });

</script>
</body>
</html>